package com.shuiyun.jtt.message.jt808;

import com.shuiyun.jtt.anno.Message;
import com.shuiyun.jtt.enums.JT808;
import com.shuiyun.jtt.message.JTMessage;
import com.shuiyun.jtt.utils.codec.DataType;
import com.shuiyun.jtt.utils.codec.FieldValue;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shuiyun
 * @program gateway
 * @description 下发终端升级包
 * @date 2022-05-11 21:42
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Message(JT808.下发终端升级包0x8108)
public class T8108 extends JTMessage {

    /** 0-终端 12-道路运输证IC卡读卡器 52-北斗定位模块 */
    @FieldValue(type = DataType.BYTE,desc = "升级类型")
    private Integer type;

    @FieldValue(type = DataType.STRING,length = 5,desc = "制造商ID")
    private String makerId;

    @FieldValue(type = DataType.STRING,lengthSize = 1,desc = "终端固件版本号")
    private String version;

    @FieldValue(type = DataType.BYTES,lengthSize = 4,desc = "升级数据包")
    private byte[] packet;
}
